﻿using UnityEngine;
using System.Collections;

namespace FrenzyIsland.UI
{
    public class UIMessageBoxSimple : MonoBehaviour
    {
        public string Message { get; set; }
        public GuiManager.SimpleDelegate OkDelegate { get; set; }
        public GuiManager.SimpleDelegate CancelDelegate { get; set; }
        
        public void Start()
        {
            this.gameObject.name = "MsgBox";
        }
        
        public void btnOk_Click()
        {
            if (OkDelegate != null) OkDelegate();
            NGUITools.Destroy(this.gameObject);
        }

        public void btnCancel_Click()
        {
            if (CancelDelegate != null) CancelDelegate();
            NGUITools.Destroy(this.gameObject);
        }
    }
}